<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue3基础语法</title>
</head>
<body>
    <p>data选项作用</p>
    <div id="app"></div>
</body>
<script src="../libs/vue.global.min.js"></script>
<script>
    const app = Vue.createApp({
        data() {
            return { count: 4 }
        }
    })

    const vm = app.mount("#app")
    document.write(vm.$data.count)
    document.write("<br>")
    document.write(vm.count)
    document.write("<br>")
    // 修改vm.count的值也会更新 $data.count
    vm.count = 10
    document.write(vm.$data.count)
    document.write("<br>")
    document.write(vm.count)
</script>
</html>